function FullFile = checkFileFormat(FullFile, ext)

if ext(1) ~= '.'
    ext = ['.' ext];
end

[Path, File] = fileparts(FullFile);
FullFile = fullfile(Path, [File, ext]);
